package com.heyue.demo.proxy.staticProxy;

/**
 * @author fenghe
 * @date 2022/2/12 19:08
 */
public class Proxy implements BaseTarget {
    private BaseTarget baseTarget;

    public Proxy(BaseTarget baseTarget) {
        this.baseTarget = baseTarget;
    }

    @Override
    public void save() {
        System.out.println("开始事务");
        baseTarget.save();
        System.out.println("提交事务");
    }
}
